glarea: Add property annotations
authorMatthias Clasen <mclasen@redhat.com>
Thu, 25 Feb 2021 02:56:40 +0000 (21:56 -0500)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 11 Mar 2021 16:37:32 +0000 (16:37 +0000)
Connect properties, getters, and setters with annotations.

gtk/gtkglarea.c
gtk/gtkglarea.h

index 57c3a8ee45055eb7e28715f0f59e79532b66fa07..93c8a7a52b258a7d1f1684e7db06cff887249c04 100644 (file)
@@ -34,9 +34,7 @@
 #include <epoxy/gl.h>
 
 /**
- * SECTION:gtkglarea
- * @Title: GtkGLArea
- * @Short_description: A widget for custom drawing with OpenGL
+ * GtkGLArea:
  *
  * `GtkGLArea` is a widget that allows drawing with OpenGL.
  *
@@ -808,7 +806,7 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
                          G_PARAM_STATIC_STRINGS);
 
   /**
-   * GtkGLArea:auto-render:
+   * GtkGLArea:auto-render: (attributes org.gtk.Property.get=gtk_gl_area_get_auto_render org.gtk.Property.set=gtk_gl_area_set_auto_render)
    *
    * If set to %TRUE the ::render signal will be emitted every time
    * the widget draws.
@@ -831,7 +829,7 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
                           G_PARAM_EXPLICIT_NOTIFY);
 
   /**
-   * GtkGLArea:has-depth-buffer:
+   * GtkGLArea:has-depth-buffer: (attributes org.gtk.Property.get=gtk_gl_area_get_has_depth_buffer org.gtk.Property.set=gtk_gl_area_set_has_depth_buffer)
    *
    * If set to %TRUE the widget will allocate and enable a depth buffer for the
    * target framebuffer.
@@ -846,7 +844,7 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
                           G_PARAM_EXPLICIT_NOTIFY);
 
   /**
-   * GtkGLArea:has-stencil-buffer:
+   * GtkGLArea:has-stencil-buffer: (attributes org.gtk.Property.get=gtk_gl_area_get_has_stencil_buffer org.gtk.Property.set=gtk_gl_area_set_has_stencil_buffer)
    *
    * If set to %TRUE the widget will allocate and enable a stencil buffer for the
    * target framebuffer.
@@ -861,12 +859,10 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
                           G_PARAM_EXPLICIT_NOTIFY);
 
   /**
-   * GtkGLArea:use-es:
+   * GtkGLArea:use-es: (attributes org.gtk.Property.get=gtk_gl_area_get_use_es org.gtk.Property.set=gtk_gl_area_set_use_es)
    *
    * If set to %TRUE the widget will try to create a `GdkGLContext` using
    * OpenGL ES instead of OpenGL.
-   *
-   * See also: [method@Gdk.GLContext.set_use_es]
    */
   obj_props[PROP_USE_ES] =
     g_param_spec_boolean ("use-es",
@@ -1036,7 +1032,7 @@ gtk_gl_area_get_error (GtkGLArea *area)
 }
 
 /**
- * gtk_gl_area_set_use_es:
+ * gtk_gl_area_set_use_es: (attributes org.gtk.Method.set_property=use-es)
  * @area: a `GtkGLArea`
  * @use_es: whether to use OpenGL or OpenGL ES
  *
@@ -1065,7 +1061,7 @@ gtk_gl_area_set_use_es (GtkGLArea *area,
 }
 
 /**
- * gtk_gl_area_get_use_es:
+ * gtk_gl_area_get_use_es: (attributes org.gtk.Method.get_property=use-es)
  * @area: a `GtkGLArea`
  *
  * Returns whether the `GtkGLArea` should use OpenGL ES.
@@ -1135,7 +1131,7 @@ gtk_gl_area_get_required_version (GtkGLArea *area,
 }
 
 /**
- * gtk_gl_area_get_has_depth_buffer:
+ * gtk_gl_area_get_has_depth_buffer: (attributes org.gtk.Method.get_property=has-depth-buffer)
  * @area: a `GtkGLArea`
  *
  * Returns whether the area has a depth buffer.
@@ -1153,7 +1149,7 @@ gtk_gl_area_get_has_depth_buffer (GtkGLArea *area)
 }
 
 /**
- * gtk_gl_area_set_has_depth_buffer:
+ * gtk_gl_area_set_has_depth_buffer: (attributes org.gtk.Method.set_property=has-depth-buffer)
  * @area: a `GtkGLArea`
  * @has_depth_buffer: %TRUE to add a depth buffer
  *
@@ -1184,7 +1180,7 @@ gtk_gl_area_set_has_depth_buffer (GtkGLArea *area,
 }
 
 /**
- * gtk_gl_area_get_has_stencil_buffer:
+ * gtk_gl_area_get_has_stencil_buffer: (attributes org.gtk.Method.get_property=has-stencil-buffer)
  * @area: a `GtkGLArea`
  *
  * Returns whether the area has a stencil buffer.
@@ -1202,7 +1198,7 @@ gtk_gl_area_get_has_stencil_buffer (GtkGLArea *area)
 }
 
 /**
- * gtk_gl_area_set_has_stencil_buffer:
+ * gtk_gl_area_set_has_stencil_buffer: (attributes org.gtk.Method.set_property=has-stencil-buffer)
  * @area: a `GtkGLArea`
  * @has_stencil_buffer: %TRUE to add a stencil buffer
  *
@@ -1260,7 +1256,7 @@ gtk_gl_area_queue_render (GtkGLArea *area)
 
 
 /**
- * gtk_gl_area_get_auto_render:
+ * gtk_gl_area_get_auto_render: (attributes org.gtk.Method.get_property=auto-render)
  * @area: a `GtkGLArea`
  *
  * Returns whether the area is in auto render mode or not.
@@ -1278,7 +1274,7 @@ gtk_gl_area_get_auto_render (GtkGLArea *area)
 }
 
 /**
- * gtk_gl_area_set_auto_render:
+ * gtk_gl_area_set_auto_render: (attributes org.gtk.Method.set_property=auto-render)
  * @area: a `GtkGLArea`
  * @auto_render: a boolean
  *
index 8d0cd0f2ca09411742c3978001fda14fb1bfb248..b7bf7a6c0959f0a25b145bfa02b4ea95d5bde8f1 100644 (file)
@@ -39,11 +39,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGLArea               GtkGLArea;
 typedef struct _GtkGLAreaClass          GtkGLAreaClass;
 
-/**
- * GtkGLArea:
- *
- * A #GtkWidget used for drawing with OpenGL.
- */
 struct _GtkGLArea
 {
   /*< private >*/